package com.wiki.gds.rabbitmq.reciever;

import com.wiki.gds.rabbitmq.controller.MOMO;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "queueName")
public class RabbitMqReciever {

    @RabbitHandler
    public void process(String hello) {
        System.out.println("Receiver : " + hello);
    }
    @RabbitHandler
    public void process(MOMO t) {
        System.out.println("Receiver : " + t.toString());
    }
}